
// import Request from "../utils/request"
import Fetch from "../utils/fetch"
// import Vue from "vue"
// let that = Vue.prototype


//轮播  
export const banner = () => Fetch.get("/banner")

//首页列表
export const cartlist = () => Fetch.get("/recommend/appIndex")

//特色课
export const lxycourse = (data) => Fetch.get('/courseBasis',data)

//课程详情接口
export const detailsID = (id) => Fetch.get(`/courseInfo/basis_id=${id}`)

//课程大纲
export let AClass = (id) => Fetch.post(`/courseChapter?id=${id}}`)

//课程评论
export let Comment = (id) => Fetch.post(`/courseComment?id=${id}}`)

//搜索接口
export const Searchs = (data) => Fetch.get('/courseBasis',data)

//分类接口
export let classify = ()=>Fetch.get(`courseBasis?page=1&limit=10&course_type=0&classify_id=&order_by=3&attr_val_id=&is_vip=0`)
//用户信息
export const user = () => Fetch.get('/userInfo')


//课程详情接口
export const details = () => Fetch.get('/courseInfo/basis_id=xxx')
//发送手机验证码
export const smsCode = (mobile) => Fetch.post(`/smsCode?mobile=${mobile}&sms_type=login`)

//短信验证码登录接口
export const login = (mobile, sms_code, type, client) => Fetch.post(`/login?mobile=${mobile}&sms_code=${sms_code}&type=${type}&client=${client}`)

//账号密码登录接口
export const login2 = (mobile, password, type, client) => Fetch.post(`/login?mobile=${mobile}&password=${password}&type=${type}&client=${client}`)

//找回密码设置密码接口
export const setLogin = (mobile, password, sms_code) => Fetch.post(`/password?mobile=${mobile}&password=${password}&sms_code=${sms_code}`)

// 讲师详情
export const teacher = (id) => Fetch.get(`/teacher/${id}`)

// 收藏类表获取
export const collect = () => Fetch.get(`/collect?page=1&limit=10&type=1`)
// 收藏类表获取
export const upimg = (data) => Fetch.post(`/public/img`, data)

//左侧课程表
export const wjleft = () => Fetch.get('/wap/classify')

//右侧内容
export const wjright = (data) => Fetch.get("/wap/quesBank/" + data.id)
//搜索
export const wjsou = (data) => Fetch.get(`/wap/search/bank?bank=${data}`)
//套卷练习


// 约课记录
export const otoCourses = (data) => Fetch.get('/otoCourse', data)
// 老师条件
export const otoCourseOptions1 = (data) => Fetch.get('/otoCourseOptions', data)
